// Automatically scan for routes auto_routes.rs

use actix_web::web::ServiceConfig;
use crate::apps::admin::controller::user_controller;
use crate::apps::admin::controller::redis_controller;
use crate::apps::admin::controller::role_controller;
use crate::apps::admin::controller::index_controller;
use crate::apps::admin::controller::upload_controller;
use crate::apps::admin::controller::remote_controller;

pub fn apps_auto_routes(config: &mut ServiceConfig) {
    // user_controller
    config.service(user_controller::list);
    config.service(user_controller::save);
    config.service(user_controller::delete);
    config.service(user_controller::update);
    config.service(user_controller::detail);

    // redis_controller
    config.service(redis_controller::save);
    config.service(redis_controller::update);
    config.service(redis_controller::delete);
    config.service(redis_controller::find);

    // role_controller
    config.service(role_controller::list);
    config.service(role_controller::save);
    config.service(role_controller::delete);
    config.service(role_controller::update);
    config.service(role_controller::detail);

    // index_controller
    config.service(index_controller::index);
    config.service(index_controller::banner);

    // upload_controller

    // remote_controller
    config.service(remote_controller::health);

}
